﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Extend
{
    public static class ExList
    {
        public static void ForEach<T>(this IEnumerable<T> source, Action<T> act)
        {
            if (source == null)
                throw new ArgumentNullException("Source Not Null");
            if (act == null)
                throw new ArgumentNullException("Action Not Null");

            foreach (T m in source)
                act(m);
        }
    }
}
